package com.scuec.groupfive.service.impl;

import com.scuec.groupfive.entity.AnswerRecord;
import com.scuec.groupfive.mapper.AnswerRecordMapper;
import com.scuec.groupfive.service.AnswerRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AnswerRecordServiceImpl implements AnswerRecordService {

    @Autowired
    private AnswerRecordMapper answerRecordMapper;

    @Override
    public AnswerRecord getLatestRecord(Long userId, Long questionId) {
        return answerRecordMapper.selectLatestByUserAndQuestion(userId, questionId);
    }
} 